-- GENERATED SPELL FOR [Shadow Vault Abomination] --


function spell0_31438(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(16790,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31438', 2000, 1)
end

function spell1_31438(pUnit, Event) --@Toppling Tower,n/a--
pUnit:FullCastSpellOnTarget(55065,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31438', 280, 1)
end

function spell2_31438(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_31438', 636, 1)
end

function Sorts_31438(pUnit, Event)
local choix_sorts_31438 = math.random(0, 2)
if choix_sorts_31438 == 0 then
pUnit:RegisterEvent('spell0_31438', 1, 1)
end
if choix_sorts_31438 == 1 then
pUnit:RegisterEvent('spell1_31438', 1, 1)
end
if choix_sorts_31438 == 2 then
pUnit:RegisterEvent('spell2_31438', 1, 1)
end
end

function mob31438_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31438', math.random(1500, 3000), 1)
end

function mob31438_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31438_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31438_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31438, 1, 'mob31438_Action')
RegisterUnitEvent(31438, 2, 'mob31438_Leave')
RegisterUnitEvent(31438, 3, 'mob31438_Kill')
RegisterUnitEvent(31438, 4, 'mob31438_Die')
